<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin:0;
            padding: 0;
        }
        .top{
            height:50px;
            /*块级元素的宽度会铺满父级元素*/
            background-color: darkred;
        }
        .banner{
            width:1220px;
            height:120px;
            margin:10px auto;
            background-color: #ff8500;
        }
        .box{
            width:1220px;
            height:300px;
            margin:10px auto;
            background-color: #4c4c4c;
        }
        .box>div{
            width:297.5px;
            height:300px;
            margin-right: 10px;
            background-color: darkblue;
            float:left;
        }
        .box>div:last-child{
            margin-right: 0;
        }
        .footer{
            height:300px;
            background-color: darkgoldenrod;
        }
    </style>
</head>
<body>
<div class="top">top</div>
<div class="banner">banner</div>
<div class="box">
    <div>1</div>
    <div>1</div>
    <div>1</div>
    <div>1</div>
</div>

<div class="footer">footer</div>
</body>
</html>